import request from '@/utils/request'
//获取菜品列表
export const pageQuery = (params = {}) => {
  return request.get('/dish/page', {
    params: {
      page: params.page || 1,
      pageSize: params.pageSize || 10,
      categoryId: params.categoryId || '',
      name: params.name || '',
      status: params.status || ''
    }
  })
}
//新增菜品
export const addDish = (obj) => {
  return request.post('/dish/add', obj)
}
//修改菜品
export const alterDish = (obj) => {
  return request.put('/dish/alter ', obj)
}
// 删除菜品
export const deleteDish = (ids) => {
  return request.delete(`/dish/batch?ids=${ids}`)
}
